package com.aidex.common.enums;

import com.aidex.common.annotation.DataSource;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * 数据源
 * 
 * @author ruoyi
 */
//使枚举类返回前端是完整的对象，否则是只会有name属性的String数组
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DataSourceType
{
    /**
     * 主库
     */
    MASTER("MASTER","若依框架数据库"),

    /**
     * 从库
     */
    SLAVE("SLAVE","业务数据库");

    private String dataBaseCode;

    private String desc;

    public String getDataBaseCode() {
        return dataBaseCode;
    }

    public void setDataBaseCode(String dataBaseCode) {
        this.dataBaseCode = dataBaseCode;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    DataSourceType(String dataBaseCode, String desc) {
        this.dataBaseCode = dataBaseCode;
        this.desc = desc;
    }

}
